package org.lifei.org.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.lifei.base.domain.BaseDomain;

import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("部门实体类")
public class Department extends BaseDomain {
        @ApiModelProperty("部门id")
        private Long id;
        @ApiModelProperty("部门名称")
        private String name;
        @ApiModelProperty("部门简介")
        private String intro;
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @ApiModelProperty("创建时间")
        private Date createTime;
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @ApiModelProperty("更新时间")
        private Date updateTime;
        @ApiModelProperty("管理人员")
        private Employee manager;
        @ApiModelProperty("父部门")
        private Department parent;
        @ApiModelProperty("部门路径")
        private String path;
        @ApiModelProperty("状态")
        private String state;

        @ApiModelProperty("上级部门查询")
        private List<Department> children;
        public Department(String name) {
                this.name = name;
        }
}
